<div class="slide-dialog-header">
    <h2>{{title}}</h2>
    <div class="slide-dialog-toolbar">
        <ul>
            <li>
                <span class="ui-btn slide-dialog-close" ng-click="close(false)"><i class="fa fa-remove"></i></span>
            </li>
        </ul>
    </div>
</div>
<div class="slide-dialog-body">
    <div class="data-panel">
        <form name="form" novalidate="novalidate" ng-submit="submit(form.$valid);">
            <div class="data-panel-body">
                <div class="data-form">
                    <dl>
                        <dt><span class="x-star">*</span>规则类型：</dt>
                        <dd>
                            <select name="type" ng-model="data.ruleType" required><option value="">请选择规则类型</option><option value="1">指标检验</option><option value="2">资源目录检验</option></select>
                            <div class="x-error" ng-if="interacted(form.type)" ng-messages="form.type.$error">
                                <span ng-message="required">规则类型不能为空</span>
                            </div>
                        </dd>
                    </dl>
                    <dl>
                        <dt><span class="x-star">*</span>规则名称：</dt>
                        <dd>
                            <input type="text" name="name" ng-model="data.ruleName" class="x-ipt" placeholder="请输入名称" required />
                            <div class="x-error" ng-if="interacted(form.name)" ng-messages="form.name.$error">
                                <span ng-message="required">规则名称不能为空</span>
                            </div>
                        </dd>
                    </dl>
                    <dl>
                        <dt><span class="x-star">*</span>规则描述：</dt>
                        <dd>
                            <textarea name="desc" ng-model="data.ruleDesc" class="x-ipt" rows="8" placeholder="请输入规则描述" required>
                            </textarea>
                            <div class="x-error" ng-if="interacted(form.desc)" ng-messages="form.desc.$error">
                                <span ng-message="required">规则描述不能为空</span>
                            </div>
                        </dd>
                    </dl>
                    <dl>
                        <dt><span class="x-star">*</span>包类名：</dt>
                        <dd>
                            <input type="text" name="package" ng-model="data.rulePackage" class="x-ipt" placeholder="请输入包类名" required ng-pattern="/^([a-zA-Z]+\.){1,10}[a-zA-Z]+$/" />
                            <div class="x-error" ng-if="interacted(form.package)" ng-messages="form.package.$error">
                                <span ng-message="required">包类名不能为空</span>
                                <span ng-message="pattern">包类名格式不正确</span>
                            </div>
                        </dd>
                    </dl>
                    <dl>
                        <dt><span class="x-star">*</span>方法名：</dt>
                        <dd>
                            <input type="text" name="method"  ng-model="data.ruleMethod" class="x-ipt" ng-init="data.ruleMethod='run'"/>
                            <div class="x-error" ng-if="interacted(form.method)" ng-messages="form.method.$error">
                                <span ng-message="required">方法名不能为空</span>
                            </div>
                        </dd>
                    </dl>
                </div>
            </div>
            <div class="data-panel-footer">
                <div class="data-tools">
                    <button class="dialog-button cancel-button" type="button" ng-click="close(false)">取消</button>
                    <button class="dialog-button" type="submit" ng-disabled="formDisabled">提交</button>
                </div>
            </div>
        </form>
    </div>
</div>